package com.english_test_sys.mapper;

import com.english_test_sys.pojo.WrongQuestion;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface WrongQuestionMapper {
    // 添加错题记录
    int insert(WrongQuestion wrongQuestion);

    // 更新错题记录
    int update(WrongQuestion wrongQuestion);

    // 根据ID查询错题
    WrongQuestion selectById(int id);

    // 根据用户ID查询所有错题
    List<WrongQuestion> selectByUserId(int userId);

    // 根据用户ID和题目ID查询错题
    WrongQuestion selectByUserIdAndQuestionId(int userId, int questionId);

    // 根据用户ID和分类查询错题
    List<WrongQuestion> selectByUserIdAndCategory(int userId, String category);
}
